package cn.com.surker.sale.dao;

import cn.com.surker.sale.entity.ContractDayPrice;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.Collection;
import java.util.List;

/**
 * <p>
 * 销售日常产值报表 Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2024-05-15
 */
public interface ContractDayPriceDao extends BaseMapper<ContractDayPrice> {

	/**
	 * 批量插入数据
	 *
	 * @param entityList
	 * @return
	 */
	boolean batchInsert(Collection<ContractDayPrice> entityList);

	/**
	 * 统计日报表累计
	 * @param startTime 开始时间 yyyy-mm-dd
	 * @param endTime 结束时间 yyyy-mm-dd
	 * @param orgId
	 * @param conId
	 * @param billType 0产值 1补贴
	 * @return
	 */
	List<ContractDayPrice> totalDayPrice(String startTime, String endTime, Long orgId, Long conId, Integer billType, Integer priceType);

	/**
	 * 计算合同全部产值
	 *
	 * @param conId
	 * @return
	 */
	Double totalProPrice(Long conId);
}